package com.orchard.orchardfarmmanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import javax.persistence.*;
import java.security.Timestamp;
import java.time.LocalDateTime;

@Entity
@Table(name = "tool_status")
public class ToolStatus {

    @Id
    @TableId(type = IdType.AUTO)
    private Long id;

    @ManyToOne
    @JoinColumn(name = "material_id", nullable = false)
    private Materials material;

    @Enumerated(EnumType.STRING)
    @Column(nullable = false)
    private Status status;

    @Column(name = "last_updated", updatable = false)
    private LocalDateTime lastUpdated;

    // Getters and Setters

    public enum Status {
        available, unavailable, under_maintenance
    }
}